home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19941031-19941221 / 000462_news@columbia.edu_Wed Dec 14 08:34:31 1994.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA03511
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Sat, 17 Dec 1994 08:21:56 -0500
  3. Received: by apakabar.cc.columbia.edu id AA08941
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Sat, 17 Dec 1994 08:21:54 -0500
  5. Path: news.columbia.edu!spcuna!solaris.cc.vt.edu!news.mathworks.com!udel!gatech!howland.reston.ans.net!news.cac.psu.edu!psuvm!hdk
  6. Organization: Penn State University
  7. Date: Wed, 14 Dec 1994 13:34:31 EST
  8. From: H. D. Knoble <HDK@psuvm.psu.edu>
  9. Message-Id: <94348.133431HDK@psuvm.psu.edu>
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: Stripping ANSI escape sequence from log, how?
  12. References: <3cnbak$8lc@pauling.wadsworth.org>
  13. Lines: 54
  14. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  15.  
  16. In article <3cnbak$8lc@pauling.wadsworth.org>, frank@news.wadsworth.org
  17. (Franklin Hsia) says:
  18.  
  19. >Working with MS-KERMIT and logging a VT220 session to a file.
  20.  
  21. >Problem:  The file contains ANSI escape sequences which are extraneous for
  22. >my purposes.  I would like to only deal with the text portion.
  23.  
  24. >Is there a utility out there that can strip away the ANSI stuff?  Or is there
  25. >a setting in KERMIT I can set to?
  26.  
  27. Try using DOS and MS-Kermit as shown in the following .BAT file to
  28. to convert the DOS capture file capfile.vt to capfile.txt:
  29.  
  30. @Echo off
  31. REM Filename: FIXVT.BAT
  32. REM Purpose: DOS Batch code to remove escape sequences from VTxxx capture
  33. REM          files using MS-Kermit as the working tool.
  34. REM By: Skip Knoble, Penn State Center for Academic Computing
  35. REM Input file: capfile.vt
  36. REM Output file: capfile.txt
  37. REM Platform: any PC and DOS that will run MS-Kermit 3.13 or 3.14
  38. REM -------------------------------------------------------------------------
  39.  
  40. REM The character string, Esc OpenBracket ? 5 i  when prepended to
  41. REM the VTxxx capture file is the code to "turn on" the PC Printer.
  42. REM Usage Note:
  43. REM You must replace the phrase "ESC OpenBracket " in the next echo
  44. REM statement with two contiguous characters: ASCII 27 ASCII 91
  45. REM before running this .BAT REM file on your PC. This is only to
  46. REM allow this DOS algorithm to appear as NON-DOS printable prose.
  47. REM (With DOS 5.x 6.x "ESC" can be entered via DOS EDIT by pressing:
  48. REM Ctrl-P,Ctrl-OpenBracket. Before DOS 5.0 occurrences of "echo." can be
  49. REM replaced by "echo LineFeed" where LineFeed is the ASCII 10 character.)
  50. echo ESC OpenBracket ?5i > temp.txt
  51. copy temp.txt /b + capfile.vt /b > nul
  52.  
  53. REM Append some linefeeds to the end to set up a message to end user.
  54. echo. >> temp.txt
  55. Echo ------- Text from CAPFILE.VT appears above this line ------- >> temp.txt
  56. FOR %%v IN (1 2 3 4 5 6 7 8 9 * 1 2 3 4 5 ) DO echo. >> temp.txt
  57. REM Append that message and LF's to roll rest of replayed session off screen.
  58. echo Please press Alt-X now to return to DOS >> temp.txt
  59. FOR %%v IN (1 2 3 4 5) DO echo. >> temp.txt
  60.  
  61. REM Invoke Kermit to convert the file temp.txt to capfile.txt
  62. REM Setting port BIOSn will allow MS-Kermit to do its thing, even while
  63. REM something else (e.g., SLIP driver)may be using COMn, without disturbing
  64. REM this COM port session.
  65. kermit -f nul, set port bios1, set print capfile.txt, replay temp.txt
  66.  
  67. erase temp.txt
  68. if exist capfile.txt Echo Output file is capfile.txt.
  69. REM ---End FIXVT.BAT ---